package com.project.erp.service.global.impl;

import javax.servlet.ServletContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.project.erp.common.Constants;
import com.project.erp.service.global.GlobalResourceService;
import com.project.erp.service.system.ParamService;

@Service
@Transactional
public class GlobalResourceServiceImpl implements GlobalResourceService {

	@Autowired
	private ParamService paramService;
	
	@Override
	public void loadParameter(ServletContext ctx) {
		ctx.setAttribute(Constants.PARAMS_MAP, paramService.getAllParams());
	}

}
